package trinnes.oliver.unimaas.smartpentalath.intelligence.features;

import trinnes.oliver.unimaas.smartpentalath.control.Game;

/**
 *
 * @author Oliver Trinnes
 */
public class RandomFeature extends Feature
{
  private int randomRange;
  public RandomFeature(int weight, int randomRange)
  {
    super(weight);
    this.randomRange = randomRange;
  }

  @Override
  public int getValue(Game game, int move)
  {
    int random = (int) (Math.random() * randomRange) + 1;
      return - randomRange / 2 + random;
  }

}
